package com.patelski.common.controller;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;

import org.jboss.seam.annotations.Transactional;

public class StatefulAbstractEntityHomeImpl<T> extends
		AbstractEntityHomeImpl<T> {

	public StatefulAbstractEntityHomeImpl() {
		super();
	}

	@Transactional
	public T getInstance() {
		joinTransaction();
		if (instance == null) {
			initInstance();
		}
		return instance;
	}

	@PersistenceContext(type = PersistenceContextType.EXTENDED)
	protected EntityManager em;

}